import multiprocessing as mu
import time,os

def func1():
    print("吃饭")
    time.sleep(4)
    print(f'{os.getppid()}-->{os.getppid()}')
def func2():
    print("睡觉")
    time.sleep(3)
    print(f'{os.getppid()}-->{os.getpid()}')
def func3():
    print("起床")
    time.sleep(6)
    print(f'{os.getppid()}-->{os.getpid()}')

things=[func1,func2,func3,func1,func2,func3]
process_pool=[]
def main():
    for subprocess in things:
        p=mu.Process(target=subprocess)
        process_pool.append(p)
        p.start()
    for process in process_pool:
        process.join()
if __name__ == '__main__':
    main()